<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        body {
            margin: 0;
            padding: 0;
        }

        .slider {
            width: 100%;
            height: 100vh;
            display: flex;
            background: url(../images/8.jpg) no-repeat;
            background-position: 0 center;
            background-size: 100vw;
            position: relative;
        }

        .slider input {
            -webkit-appearance: none;
            width: 100%;
            background: none;
        }

        .slider input::-webkit-slider-thumb {
            -webkit-appearance: none;
            width: 10px;
            height: 100vh;
            background-color: #111;
            cursor: pointer;
        }

        .original-image {
            position: absolute;
            left: 0;
            width: 20%;
            height: 100vh;
            background: url(../images/9.jpg) no-repeat;
            background-position: 0 center;
            background-size: 100vw;
        }
    </style>
</head>

<body>
    <div class="slider">
        <div class="original-image"></div>
        <input type="range" value="20" max="100">
    </div>
</body>
<script>
    document.querySelector(".slider input").addEventListener("input",
        function () {
            document.querySelector(".original-image").style.width = this.value + "%"
        });
</script>

</html>